from sklearn.neighbors import NearestNeighbors

class MusicRecommender:
    def __init__(self, n_neighbors=5):
        self.model = NearestNeighbors(n_neighbors=n_neighbors)

    def fit(self, features):
        self.model.fit(features)

    def recommend(self, query_vector, n=5):
        return self.model.kneighbors([query_vector], n_neighbors=n)